package com.leyou.trade.config;

import com.leyou.auth.thread.UserContext;
import feign.RequestInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 虎哥
 */
@Configuration
public class FeignConfig {

    @Bean
    public RequestInterceptor requestInterceptor(){
       return template -> template.header("Cookie", "LY_TOKEN=" + UserContext.getJwt());
    }
}
